Skip to content

fix: connect skill adapter lifecycle events to runtime event system#545

Merged
FL4TLiN3 merged 2 commits intomainfrom
fix/skill-manager-lifecycle-event-plumbing
Feb 16, 2026
Merged

fix: connect skill adapter lifecycle events to runtime event system#545
FL4TLiN3 merged 2 commits intomainfrom
fix/skill-manager-lifecycle-event-plumbing

Conversation

@FL4TLiN3
Copy link
Contributor

Summary

  • Replace unused runtimeEventListener option with onLifecycleEvent (adapter-level callback) in SkillManagerOptions
  • Thread onLifecycleEvent through all factory contexts (fromExpert, fromLockfile, addSkill, addDelegate)
  • Add _connectingEventData() hook to SkillAdapter base class; override in McpSkillAdapter to provide command/args or endpoint
  • Include connectDurationMs/spawnDurationMs timing data in connected events
  • Prevent LockfileSkillAdapter from emitting spurious lifecycle events (only the real adapter emits)
  • Replace batch emitSkillConnectedEvents() with real-time createLifecycleEventBridge() in CoordinatorExecutor that bridges connecting→skillStarting, connected→skillConnected, stderr→skillStderr, disconnected→skillDisconnected

Test plan

  • pnpm typecheck — passes
  • pnpm test — 1079 tests pass (92 files)
  • pnpm test:e2e — 78 tests pass (19 files)
  • pnpm build — passes
  • pnpm format-and-lint — passes (no new warnings)
  • pnpm run validate:changeset — passes

🤖 Generated with Claude Code

FL4TLiN3 and others added 2 commits February 16, 2026 18:23
Replace unused runtimeEventListener with onLifecycleEvent callback,
thread it through all factory contexts, and bridge adapter-level
lifecycle events to RuntimeEvents in CoordinatorExecutor.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@FL4TLiN3 FL4TLiN3 merged commit 982ea74 into main Feb 16, 2026
11 checks passed
@FL4TLiN3 FL4TLiN3 mentioned this pull request Feb 16, 2026
FL4TLiN3 added a commit that referenced this pull request Feb 16, 2026
With real-time lifecycle event emission (from #545), the gap between
base's skillConnected and startRun now includes other adapter setup
time. Increase threshold from 50ms to 200ms to account for this.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant